package com.mikhailenko.transportMVC.repository;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

import com.mikhailenko.transportMVC.model.Group;

public interface GroupRepository extends JpaRepository<Group, Integer>{
    
    @Query("SELECT group FROM groups group WHERE group.name = :name ")
    Group findByName(@Param("name") String name);
    
}
